<template>
	<el-dialog v-model="dialogFormVisible" title="Shipping address">
	  <el-form :model="form">
	    <el-form-item label="名称" :label-width="formLabelWidth">
	      <el-input v-model="form.name" autocomplete="off" />
	    </el-form-item>
	  </el-form>
	  <template #footer>
	    <span class="dialog-footer">
	      <el-button @click="dialogFormVisible = false">取消</el-button>
	      <el-button type="primary" @click="dialogFormVisible = false">
	        保存
	      </el-button>
	    </span>
	  </template>
	</el-dialog>
</template>

<script lang="ts" setup>
	import { reactive, ref } from 'vue'
	const dialogFormVisible = ref(false)
	const formLabelWidth = '50px'
	
	const form = reactive({
		id:'',
		name: '',
	})
	
	const setVisible=(visible:boolean,node:Object)=>{
		dialogFormVisible.value=visible; 
		form.id=node.id;
		form.name=node.label;
	}
	defineExpose({
	  setVisible,
	});
	
</script>

<style>
</style>